import {BaseConfig, FieldConfig} from "@/fields/config";

export class InputConfig extends BaseConfig {
  title = "单行文本";
  maxLength = 10;
  placeholder = '请输入内容'
  showLimit = true
  isReadonly = false
  isDisable = false
  propsValue = {
    'maxLength': 'maxLength',
    'showLimit': 'showLimit',
    'isReadonly': 'isReadonly',
    'isDisable': 'isDisable'
  }
}

const fieldType = "input";

export const inputDefine = {
  name:"单行文本",
  icon:"el-icon-document-remove",
  type: fieldType,
  create: () => {
    const config = new InputConfig();
    return new FieldConfig(fieldType, config);
  },
  design: () => import(/* webpackChunkName: "form.comp.all" */ "@/views/fields/designer/input/index"),
  config: () => import(/* webpackChunkName: "form.comp.all" */ "@/views/fields/common/PropsPanel")
}
